<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ include file="../general/header.jsp" %>
	<div id="header">Items List</div>
		<%@ include file="../general/menu.jsp" %>
	<div id="content">
		<div>
			<table class="listas">
				<tr style="font-weight:bold;">
					<td>Item</td> 
					<td>Amount</td>
					<td>Buyer</td>
					<td>Buyer Confirmation</td> 
					<td>Seller</td> 
					<td>Seller Confirmation</td>
					<td>Solve as Realized</td>
					<td>Solve as Not Realized</td>
				</tr>
				<c:forEach var="conflict" items="${conflicted}">
					<tr>
						<td> <a href="../item/itemDetail?itemid=<c:out value='${conflict.item.id}' /> "> <c:out value="${conflict.item.name}" /> </a> </td>
						<td> <c:out value="${conflict.qty}" /> </td>
						<td> <a href="../user/viewProfile?userid=<c:out value='${conflict.user.id}' /> "> <c:out value="${conflict.user.userName}" /> </a> </td>
						<td>  <c:out value="${conflict.confirmation.buyerConfirmation}" /> </td> 
	 					<td> <a href="../user/viewProfile?userid=<c:out value='${conflict.item.user.id}' /> "> <c:out value="${conflict.item.user.userName}" /> </a> </td>
	 					<td>  <c:out value="${conflict.confirmation.sellerConfirmation}" /> </td>
	 					<td> <a href="../purchase/resolvePurchase?purchaseId=<c:out value='${conflict.id}' />&confirmType=0"> solve now! </a> </td>
	 					<td> <a href="../purchase/resolvePurchase?purchaseId=<c:out value='${conflict.id}' />&confirmType=1"> solve now! </a> </td>
					</tr> 				 					
				</c:forEach>
			</table>
		</div>
	</div>
<div style="clear:both;"></div>
<div id="bottom">
	<a href="../general/index">Go Back to Index</a>
</div>
<script type="text/javascript">
	hideDirection();
</script>
<%@ include file="../general/footer.jsp" %>
